package com.hb.common.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultVo {
    private Integer code;
    private String  message;
    private Object   data;


    public static  ResultVo   success(String message,Object data){
     return new ResultVo(20000,message,data);
    }
    public static  ResultVo  error(String message,Object data){
        return new ResultVo(50000,message,null);
    }
    public static  ResultVo  error(Integer code,String message,Object data){
        return new ResultVo(50012,message,null);
    }
}
